package yxy.apple.db;

import java.util.Date;

public final class ScalarResultBuilder {

    public final static ResultObjectBuilder<Integer> INT_RESULT_BUILDER;
    public final static ResultObjectBuilder<Date> DATE_RESULT_BUILDER;
    public final static ResultObjectBuilder<String> STRING_RESULT_BUILDER;

    static {
        INT_RESULT_BUILDER = rs -> rs.getInt(1);

        DATE_RESULT_BUILDER = rs -> new Date(rs.getTimestamp(1).getTime());

        STRING_RESULT_BUILDER = rs -> rs.getString(1);
    }
}
